{{useCss "app-pages/css/goods_list.scss"}}
<div class="goods_list">
    <div class="chooselist {{touchNav&&'focus'}}">
        <href class="item first" to="/goods_list.html?id=3">
            最新上架
        </href>
        <href class="item" to="/goods_list.html?id=2">
            销量最高
        </href>
        <a class="item" event-click="{{'$Event.goods_list.change_sort'}}">
            价格<i class="icon-{{$Cache.goods_list.sort_asc_type&&'down'||'up'}}-open-big"></i>
        </a>
        <!-- <a class="item" event-click="{{'$Event.goods_list.open_tags'}}">
            分类
        </a> -->
    </div>
    <div class="typetitle">
        {{$Cache.goods_list.typetitle}}
    </div>
    {{#each $Cache.goods_list.list}}
    <div class="listitem">
        <div class="goodsimg">
            <a event-click="{{'$Top.$Event.goods_list.jump_to_details'}}">
                <img bind-src="{{preview_img_url}}?imageView/1/w/250/h/250" />
            </a>
        </div>
        <div class="box">
            <div class="addcart">
                <div class="price_box">
                    <div class="item">￥{{#Fixed cash}}</div>
                    {{#if original_price}}
                    <div class="item">
                        <del>￥{{#Fixed original_price}}</del>
                    </div>
                    {{/if}}
                </div>
                <div class="buy_btn_box">
                    <button class="icon-basket" event-click="{{'$Top.$Event.goods_list.add_to_cart'}}">购买</button>
                </div>
            </div>
            <div class="info">
                <a>
                    <b>{{goods_name+" "}}</b>
                    {{intro}}
                </a>
            </div>
        </div>
    </div>
    {{/each}}
    {{#if !$Cache.goods_list.list.length}}
        <div class="listitem">
            <i>此目录下暂没有上传商品</i>
        </div>
    {{/if}}
    {{#if $Cache.goods_list.type}}
    <div class="getmore">
        {{#if loadingoods}}
        <p><i class="icon-spin4"></i>正在加载</p>
        {{#else}} 
        {{#if isresult}}
        <button class="btn" event-click="{{'$Event.goods_list.getMoreGoods'}}" id="_mark">查看更多商品</button>
        {{#else}}
        <p>没有更多东西了</p>
        {{/if}} {{/if}}
    </div>
    {{/if}}
</div>

<!-- <div class="tagsblock {{$Cache.goods_list.open_tags&&'focus'}}">
    <div class="tagsbox">
        {{#if $Cache.goods_list.classify_tree.childs.length}}
            {{#> "goods-detail-classify-tree-item","$Cache.goods_list.classify_tree",$Cache.goods_list.classify_tree.childs.length}}
            <xmp type="template" name="goods-detail-classify-tree-item">
                {{#each childs}}
                <div class="classify-item {{deep==1&&'first'}}" event-click="{{'$Top.$Event.goods_list.open_tree'}}">
                    <div class="classify {{($Top.$Cache.goods_list.classify_id==classify._id)&&'focus'}}" event-click="{{'$Top.$Event.goods_list.set_classify_id'}}">
                        {{classify.classify_name}}
                    </div>
                    {{#> "goods-detail-classify-tree-item","$This",childs.length}}
                </div>
                {{/each}}
            </xmp>
        {{#else}}
            <p><i>暂没有设置任何分类</i></p>
        {{/if}}
    </div>
    <div class="submit_classify" event-click="{{'$Event.goods_list.get_goods_by_classify_id'}}">确定</div>
    <div class="icon-right-open-big" event-click="{{'$Event.goods_list.open_tags'}}">返回</div>
</div> -->
